using Services.Initial.Extensions;
using Services.Initial.Options;


var builder = WebApplication.CreateBuilder(args);

builder.ConfigureDbConfiguration();
builder.ConfigureExtraServices(new InitializerOptions("../Log/WebApi","Error.WebApi"));
builder.Services.AddSwaggerGen(c =>
{
    c.SwaggerDoc("v1", new() { Title = "Error.WebAPi", Version = "V1" });
});
//添加数据保护
builder.Services.AddDataProtection();
//添加分布式缓存
builder.AddRedisDistributedCache("RedisConnection");

var app = builder.Build();


app.UseMyDefault("Error");

app.Run();